<link rel="stylesheet" type="text/css" media="handheld" href="http://mt.gov/code/handheld.css" />

<!-- Insert Correct Last Modified Date for Texis -->

<% 
  Dim strFileName
  Dim dtmLastModified
  Dim strLastModified
  
  strFileName = Request.ServerVariables("SCRIPT_NAME")
  strFileName = Replace(strFileName, "/", "\")
  strFileName = Server.MapPath(strFileName)

  Set objFileSystemObject = Server.CreateObject("Scripting.FileSystemObject")

  Set objFile = objFileSystemObject.GetFile(strFileName)
  dtmLastModified = objFile.DateLastModified
  Set objFile = Nothing

  Set objFileSystemObject = Nothing

	function DateToHTTPDate(ByVal OleDATE)
	  Const GMTdiff = #07:00:00#
	  OleDATE = OleDATE + GMTdiff
		DateToHTTPDate = engWeekDayName(OleDATE) & _
		", " & Right("0" & Day(OleDATE),2) & " " & engMonthName(OleDATE) & _
		" " & Year(OleDATE) & " " & Right("0" & Hour(OleDATE),2) & _
		":" & Right("0" & Minute(OleDATE),2) & ":" & Right("0" & Second(OleDATE),2) & " GMT"
	End Function 

	Function engWeekDayName(dt)
		Dim strDay
		Select Case WeekDay(dt,1)
			Case 1:strDay="Sun"
			Case 2:strDay="Mon"
			Case 3:strDay="Tue"
			Case 4:strDay="Wed"
			Case 5:strDay="Thu"
			Case 6:strDay="Fri"
			Case 7:strDay="Sat"
		End Select
		engWeekDayName = strDay
	End Function

	Function engMonthName(dt)
		Dim strMon
		Select Case Month(dt)
			Case 1:strMon="Jan"
			Case 2:strMon="Feb"
			Case 3:strMon="Mar"
			Case 4:strMon="Apr"
			Case 5:strMon="May"
			Case 6:strMon="Jun"
			Case 7:strMon="Jul"
			Case 8:strMon="Aug"
			Case 9:strMon="Sep"
			Case 10:strMon="Oct"
			Case 11:strMon="Nov"
			Case 12:strMon="Dec"
		End Select
		engMonthName = strMon
	End Function
	
	strLastModified = DateToHTTPDate(dtmLastModified)
	
	Response.AddHeader "cache-control", "private, no-cache, must-revalidate"
	Response.AddHeader "Last-Modified", strLastModified
%>

<!-- End Last Modified Date Code for Texis -->	
